﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:ad="clr-namespace:AvalonDock;assembly=AvalonDock"
                    xmlns:adRes="clr-namespace:AvalonDock.Properties;assembly=AvalonDock">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/AvalonDock.Themes;component/themes/dev2010.xaml"/>
    </ResourceDictionary.MergedDictionaries>


    <Style x:Key="DockableContentTabItemStyle" TargetType="{x:Type ad:DockableContent}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ad:DockableContent}">
                    <Grid SnapsToDevicePixels="True">
                        <Border 
						    x:Name="PART_DragArea" 
						    BorderBrush="#4f6489" 
						    BorderThickness="1,0,1,1" 
                            Margin="0,0,0,0"
                            CornerRadius="0,0,3,3"
                            Background="#3f5479"                             
                            >
                            <Border x:Name="tabItemIntBorder" 
							Margin="2,2,2,2" 
							BorderBrush="#3f5479">
                                <StackPanel Orientation="Horizontal">
                                    <ContentPresenter x:Name="Icon"
                                              Margin="1"
                                              VerticalAlignment="Center"
                                              ContentSource="Icon"
                                              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                                    <TextBlock 
								        x:Name="tabItemTitle" 
								        TextTrimming="CharacterEllipsis" TextWrapping="NoWrap"
								        Text="{TemplateBinding Title}" 
								        Margin="0,0,4,0"  
								        Foreground="White"/>
                                </StackPanel>
                            </Border>
                        </Border>
                        <Border x:Name="HighlightBorder"
                                        Height="3"
                                        VerticalAlignment="Bottom"
                                        BorderThickness="0,0,0,0"
                                        CornerRadius ="0,0,3,3"
                                        BorderBrush="#FFE68B2C"
                                        Background="CornflowerBlue"
                                        Visibility="Hidden"
                                        />
                    </Grid>

                    <ControlTemplate.Triggers>
                        <Trigger Property="Selector.IsSelected"
								 Value="true">
                            <Setter Property="BorderThickness"
									Value="0" TargetName="tabItemIntBorder"/>
                            <Setter Property="BorderThickness"
									Value="1,0,1,0" TargetName="PART_DragArea"/>
                            <Setter Property="Background"
									Value="#FFFCFCFE" TargetName="PART_DragArea"/>
                            <Setter Property="CornerRadius"
									Value="0,0,3,3" TargetName="PART_DragArea"/>
                            <Setter Property="Visibility"
									Value="Visible" TargetName="HighlightBorder"/>
                            <Setter Property="Foreground"
									Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" TargetName="tabItemTitle"/>
                            <Setter Property="Margin"
                                    Value="0,3,0,2" TargetName="tabItemIntBorder"/>
                            <Setter Property="Margin"
                                    Value="0,1,0,0" TargetName="PART_DragArea"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver"
								 Value="true">
                            <Setter Property="Visibility"
									Value="Visible" TargetName="HighlightBorder"/>
                        </Trigger>
                        <Trigger Property="Icon"
                     Value="{x:Null}">
                            <Setter TargetName="Icon"
                        Property="Visibility"
                        Value="Collapsed"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>